package com.hfy.shop.controller;

import com.hfy.shop.service.GoodService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

/**
 * @ author 韩
 * time: 2024/9/9 11:27
 */


@RestController
@RequestMapping("/good")
@Tag(name = "商品控制器" ,description = "对会员以及其它商品进行操作")
public class GoodController {

    @Autowired
    private GoodService goodService;


    @GetMapping("/common_vips")
    @Operation(summary = "获取普通会员列表",description = "获取普通会员列表，来进行展示")
    public Result getCommonVips() {
        return goodService.getCommonVips();
    }

    @GetMapping("/very_vips")
    @Operation(summary = "获取超级会员列表",description = "获取超级会员列表，来进行展示")
    public Result getVeryVips() {
        return goodService.getVeryVips();
    }

    @GetMapping("/common")
    @Operation(summary = "获取已上架的普通商品列表",description = "获取普通商品列表，来进行展示")
    public Result getCommonGoods() {
        return goodService.getCommonGoods();
    }
}
